package com.amigo.online.provider.sync.cloud.ribbon;

import java.net.URI;
import java.net.URISyntaxException;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;

public class MyHttpRequest implements HttpRequest {

    private HttpRequest sourceRequest;

    public MyHttpRequest(HttpRequest sourceRequest) {
        this.sourceRequest = sourceRequest;
    }

    @Override
    public HttpHeaders getHeaders() {
        return sourceRequest.getHeaders();
    }

    @Override
    public String getMethodValue() {
        return sourceRequest.getMethodValue();
    }

    @Override
    public URI getURI() {


        try {
            String oldUrl = sourceRequest.getURI().toString();
            URI newUri = new URI("");
            return newUri;
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }

        return sourceRequest.getURI();
    }

}
